import request from '@/utils/request'

export function registerAgent(data) {
  return request({
    url: '/agent/register',
    method: 'post',
    data
  })
}

export function unregisterAgent(agentId) {
  return request({
    url: '/agent/unregister',
    method: 'post',
    params: { agentId }
  })
}

export function getAgentList(params) {
  return request({
    url: '/agent/list',
    method: 'get',
    params
  })
}

export function getAgentDetail(agentId) {
  return request({
    url: `/agent/${agentId}`,
    method: 'get'
  })
}
